import request from '@/utils/request'

const api = {
  index: '/upload/upload_group'
}

export function index(params) {
  return request({
    url: api.index,
    method: 'get',
    params
  })
}

export function store(data) {
  return request({
    url: api.index,
    method: 'post',
    data
  })
}

export function update(id, data) {
  return request({
    url: `${api.index}/${id}`,
    method: 'put',
    data
  })
}

export function destroy(id) {
  return request({
    url: `${api.index}/${id}`,
    method: 'delete'
  })
}
